import os

import pymongo

mongo_client = pymongo.MongoClient(host='127.0.0.1', port=27017)
collection = mongo_client.test.t001
m = collection.update_one({'url': "456"}, {'$set': {"detail": "002"}}, upsert=True)
print(m)

